<?php

namespace Biz\model\activity;

class SuperBuyPlanet extends \Doraemon\pockets\datebase\BaseDbModel
{
    const _CONFIG_FILE_ = 'db_shop';

    const _CONFIG_SELECT_ = 'db_activity';

    const _DATABASE_ = 'shop_activity';

    const _TABLE_NAME = 'activity_super_buy_planet';



    public static function inserData($data)
    {
        $data['addtime'] = date("Y-m-d H:i:s");
        if (self::insert($data)->rowcount()) {
           return self::id();
        } else {
            return false;
        }
    }

    public static function updateData($data)
    {
        $data['edittime'] = date("Y-m-d H:i:s");
        return self::update($data,['uid' => $data['uid']]);
    }

    public static function getByUid($uid)
    {
        return self::get("*" , ['uid' => $uid]);
    }
}